Skip to content

add revert for applied fixes - #47

Merged
madoiscool merged 2 commits into
madoiscool:mainfrom
Brandher58:main
Sep 8, 2026
Merged

add revert for applied fixes#47
madoiscool merged 2 commits into
madoiscool:mainfrom
Brandher58:main

Conversation

@Brandher58

@Brandher58 Brandher58 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What

Adds the ability to revert an applied fix back to the original game files.

How

  • Applying a fix now backups already-existing files as .bak inside .luatools-fix/ in the game folder, and records every modified/added file in a JSON manifest.
  • A new "Revert" button appears next to the fix once applied. Tapping it restores the .bak files, deletes the files the fix added, and removes the manifest.
  • The manifest is written even if the apply partially fails, so backed-up files stay recoverable.
  • UI updates immediately on apply/revert (no flyout reopen needed).
  • Confirmation dialog shows the game name; new strings translated to Spanish.
  • New "My games" toggle next to the tag pills. It cross-references the fix listing against the luas in Steam's config/stplug-in (the same scan the Manage page uses) and shows only those games.
{57AB661D-8F2C-4D8F-84B9-BF4C74E7A806}

@madoiscool

Copy link
Copy Markdown
Owner

@claude is this fire

@madoiscool
madoiscool merged commit 54e3d56 into madoiscool:main Sep 8, 2026
1 check failed
madoiscool added a commit that referenced this pull request Sep 8, 2026
Follow-up to #47.

Revert no longer deletes its own backups when it fails partway. The cleanup
ran before the error check, so a revert blocked by a locked file (the usual
cause being the game still running) destroyed every .bak and the manifest,
leaving the user half-reverted with no way to finish. It now runs only on
full success, so a failed revert is simply retryable. This matches what the
apply path already does: it writes the manifest even on partial failure so
the backups stay recoverable.

Back up by full relative path rather than file name. Fix archives routinely
ship the same name in several folders (steam_api64.dll, config.ini), and
keying by name collapsed them onto one .bak. The existing guard then skipped
backing up the second file while still recording it as "modified" pointing at
the first one's backup, so a revert either restored one file with another's
contents or silently restored nothing once the .bak was consumed.

Constrain both the extract and the revert to the game folder. Zip entry names
and the revert manifest are both untrusted input, the manifest lives in a
user-writable folder, and the revert path deletes what it resolves. Same
containment check DepotDownloaderService.TryDeleteCreatedFiles already uses.

Translate the 14 new strings into the remaining 28 locales. The PR shipped
English and Spanish only, which failed the i18n check with 28 problems.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants